package cn.yyj.springsecurity02.web;

import cn.yyj.springsecurity02.entity.Student;
import cn.yyj.springsecurity02.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class StudentController {
    @Autowired
    StudentService studentService;

    @RequestMapping("/student")
    public List<Student> findAll(){
        return studentService.findAll();
    }
}